
// 拿出本地储存 
//  读取json字符串数据
const getLocalData = localStorage.getItem('token')
console.log(getLocalData);
// json字符串转化为json对象
const jsonObj = JSON.parse(getLocalData)
console.log(jsonObj);


const { userInfo } = jsonObj
console.log(userInfo);

document.querySelector('.user-icon img').src = userInfo.icon
document.querySelector('.text').innerHTML = `<h3>昵称：${userInfo.username}<br><span class="dec"><b>个性宣言</b>:${userInfo.notes}</span></h3>
    <p>
      性别：${userInfo.sex ? '女' : '男'}<span> |</span>
      手机号：${userInfo.mobile} <span>|</span>
      出生年月：${userInfo.birthday}
    </p>`


//console.log(localStorage.getItem('token'));
